<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue校验</title>
    <link rel="stylesheet" href="static/frameset.css">
    <style>
        .m_line {padding: 10px;}
        .m_line_tip {}
        .m_line_tip.error {color:red;}
        .m_time {border:1px solid;display: inline-block;padding: 10px;}
    </style>
</head>
<body>

    <div id="J_wrap" class="m_wrap p_index" v-allcheck="myForm">
        <div class="m_line">
            不能为空<input type="text" v-model="msg1" check="[{'type': 'require', 'tip': '自定义提示'}]">
        </div>
        <div class="m_line">
            不能为空<input type="text" v-model="msg2" check="[{'type': 'require'}]">
        </div>
        <div class="m_line">
            整数<input type="text" v-model="msg3" check="[{'type': 'int'}]">
        </div>
        <div class="m_line">
            数字<input type="text" v-model="msg4" check="[{'type': 'float'}]">
        </div>
        <div class="m_line">
            整数 最大值100、最小值5<input type="text" v-model="msg5" check="[{'type': 'int'}, {'type':'max', 'val':100}, {'type':'min', 'val':5}]">
        </div>
        <div class="m_line">
            长度5<input type="text" check="[{'type': 'length', 'val':5}]">
        </div>
        <div class="m_line">
            最大长度6，最小长度3<input type="text" check="[{'type': 'length', 'min':3, 'max':6}]">
        </div>
        <div class="m_line">
            <div v-time="time" class="m_time"></div>
        </div>

        <div class="m_line">
            <button v-on:click="submit">提交</button>
        </div>
    </div>

    <!-- builder: plugins{{ _$hash }}.js -->
    <script src="main/plugins/zepto/zepto.min.js"></script>
    <script src="main/plugins/vue/vue.min.js"></script>
    <script src="main/plugins/seajs/sea.js"></script>
    <!-- builder end -->

    <!-- 构建的时候自动inline，里面的js不要写注释 -->
    <script src="main/common/seaconfig.js"></script>

    <script type="text/javascript">
        seajs.use( 'index' );
    </script>
</body>
</html>
